package com.deke.auth.feign;

import com.deke.entity.AclPermission;
import com.deke.entity.AclUser;
import com.deke.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author ：Username 刘亦辰（59372312@qq.com）
 * @date ：Created in 2022/12/1 18:19
 * @description：
 * @modified By：
 * @version:
 **/
@FeignClient(value = "education-system")
public interface SystemFeign {

    //根据用户名查询账户信息
    @GetMapping("/system/user/queryByUsername/{username}")
    public Result<AclUser> queryByUsername(@PathVariable String username);

    //根据用户id查询账户权限
    @GetMapping("/system/permission/queryPermissionByUserid/{userid}")
    public Result<List<AclPermission>> queryPermissionByUserid(@PathVariable String userid);
}